﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MMDemo
{
    public partial class SysSetUpForm : Form
    {
        public SysSetUpForm()
        {
            InitializeComponent();
        }
        public float scale = 1;
        private void OkBtn_Click(object sender, EventArgs e)
        {
            int BarValue = 5;
            BarValue = trackBar1.Value;
            scale = (float)(BarValue / 25.0 * 4.8 + 0.2);
            PublicDataClass.scale = scale;
            PublicDataClass.IsOpenBackMusic = BackMusiccheckBox.Checked;
            PublicDataClass.IsOpenSound = SoundcheckBox.Checked;
            SysMainForm.ChangBackMusicState(PublicDataClass.IsOpenBackMusic);
            this.Close();
        }

        private void CannelBtn_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void SystemSetUpForm_Load(object sender, EventArgs e)
        {
            this.BackMusiccheckBox.Checked = PublicDataClass.IsOpenBackMusic;
        }
    }
}
